<!DOCTYPE html>
<html>
<head>
<title>字段管理</title>
[#include "/WEB-INF/admin/include/common.html"]
</head>
<body class="gray-bg">
    <div class="wrapper wrapper-content animated fadeInRight">
        <div class="ibox float-e-margins">
            <div class="ibox-title">
                <h5>字段管理</h5>
            </div>
           	<form id="listForm" action="list" method="get">
	            <div class="ibox-content">
	                <!-- 列表 start -->
	                <div class="form-horizontal clear">
	                    <div class="form-group">
	                        <div class="col-sm-8">
	                            <a class="btn btn-primary" href="add?contentModelId=${contentModelId}"><i class="fa fa-plus"></i> 添加</a>
	                            <a href="javascript:;" class="btn btn-warning disabled" id="deleteButton"><i class="fa fa-trash"></i> 删除</a>
	                            <a href="javascript:;" class="btn btn-primary" id="refreshButton"><i class="fa fa-refresh"></i> 刷新</a>
	                        </div>
	                    </div>
	                    <div class="table-responsive">
	                        <table class="table table-bordered" id="listTable">
	                            <thead>
	                                <tr>
	                                    <th width="40" class="text-center"><input type="checkbox" id="selectAll" /></th>
	                                    <th>ID</th>
	                                    <th>别名</th>
	                                    <th>类别</th>
	                                    <th>名称</th>
	                                    <th>状态</th>
	                                    <th>是否必填</th>
	                                    <th>创建日期</th>
	                                    <th>操作</th>
	                                </tr>
	                            </thead>
	                            <tbody>
	                            	[#list contentFields as contentField]
	                                <tr>
	                                    <td class="text-center"><input type="checkbox" name="ids" value="${contentField.id}" /></td>
	                                    <td>${contentField.id}</td>
	                                    <td>${contentField.alias}</td>
	                                    <td>${fieldTypeNames.get(contentField.type)}</td>
	                                    <td>${contentField.name}</td>
	                                    <td>[#if contentField.isEnabled]已启用[#else]已禁用[/#if]</td>
	                                    <td>[#if contentField.isRequired]必填[#else]非必填[/#if]</td>
	                                    <td>${contentField.createDate}</td>
	                                    <td>
	                                        <a href="edit?id=${contentField.id}">[编辑]</a>
	                                    </td>
	                                </tr>
	                                [/#list]
	                            </tbody>
	                        </table>
	                    </div>
	                    <div class="text-center">
                            [@pagination pageNumber = page.pageNumber totalPages = page.totalPage]
								[#include "/WEB-INF/admin/include/pagination.html"]
							[/@pagination]
	                    </div>
	                </div>
	                <!-- 列表 end -->
	            </div>
            </form>
        </div>
    </div>
</body>
</html>